<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * By		o熊小猫o
 * Email	show1990@foxmail.com
 *
 */
class Home extends CI_Controller {

	public function __construct() {
		parent::__construct();
		//辅助函数
		$this->load->helper( array('url','text','language','xml'));
		//类库
		$this->load->library('user_agent');
	}

	//960 CSS
	function css()
	{
		$this->load->view('960css');
	}
	
	//960 CSS
	function config()
	{
		if ($this->agent->is_mobile('iphone'))
		{
		   $date['iphone']	=	"yes";
		}
		else
		{
		    $date['iphone']	=	"no";
		}
		$date['style']	=	$this->config->item('style');
		$this->load->view('config',$date);
	}
	
	//首页
	function index()
	{
		$this->load->view('home/home');
	}
	
	/**
	 * Email操作
	 *
	 */

	function email()
	{
		$config['protocol'] 	= 'smtp';//协议
		$config['charset'] 		= '	utf-8';//字符集
		$config['smtp_port'] 	= 25;//端口
		$config['smtp_host'] 	= 'smtp.163.com';//服务器
		$config['smtp_user']	= 'zhuanbj@163.com';//用户名
		$config['smtp_pass']	= 'buzhidao';//密码
		$this->load->library('email',$config);
		$this->email->from('zhuanbj@163.com','o熊小猫o');//发件人email地址和名称
		$this->email->to('');//收件人
		$this->email->subject('俺是主题');
		$this->email->message('邮件为系统自动发送！');
		$query=$this->email->send();
		if ($query)
		{
			echo 'ok';//$this->email->print_debugger();
		}else {
			echo $this->email->print_debugger();
		}
	}
}

/* End of file home.php */
/* Location: ./application/controllers/home.php */